package com.bm.server.controller;

import com.bm.common.dto.DogkillDto;
import com.bm.common.vo.R;
import com.bm.server.service.intf.DogkillService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
 * |                     ______                     |
 * |                  .-"      "-.                  |
 * |                 /            \                 |
 * |     _          |              |          _     |
 * |    ( \         |,  .-.  .-.  ,|         / )    |
 * |     > "=._     | )(__/  \__)( |     _.=" <     |
 * |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |
 * |           "=._"(_     ^^     _)"_.="           |
 * |               "=\__|IIIIII|__/="               |
 * |              _.="| \IIIIII/ |"=._              |
 * |    _     _.="_.="\          /"=._"=._     _    |
 * |   ( \_.="_.="     `--------`     "=._"=._/ )   |
 * |    > _.="                            "=._ <    |
 * |   (_/                                    \_)   |
 * |                                                |
 * '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
 * -----------------代码的搬运工-----------------
 *
 * @Date: 2022/07/21/14:05
 */
@RestController
@RequestMapping("/server/dogkill/")
public class DogkillController {
    @Resource
    private DogkillService service;
    @GetMapping("selectnums.do")
    public R selectnums(int roomid){
        return service.countuid(roomid);
    }
    @PostMapping("save.do")
    public R save(@RequestBody DogkillDto dto){
        return service.save(dto);
    }
    @PostMapping("outroom.do")
    public R outroom(@RequestBody DogkillDto dto){
        return service.deleteByUid(dto);
    }
    @GetMapping("gameStart.do")
    public R gameStart(int roomid){
        return service.gameStart(roomid);
    }
    @GetMapping("selectByname")
    public R selectByname(int uid){
        return service.selectByUid(uid);
    }
    @GetMapping("wolfkillpeople")
    public R wolfkillpeople(int uid){
        return service.wolfkillpeople(uid);
    }
    @GetMapping("nvwusave.do")
    public R nvwusave(int roomid,String save){
        return service.nvwusave(roomid, save);
    }
    @GetMapping("nvwukill.do")
    public R nvwukill(int roomid, String kill,int uid){
        return service.nvwukill(roomid, kill, uid);
    }
    @GetMapping("deleteByid.do")
    public R deleteByid(int roomid,int uid){
       return service.deleteByid(roomid, uid);
    }
    @GetMapping("isgameoverhao.do")
    public R isgameoverhao(int roomid){
        return service.isgameoverhao(roomid);
    }
    @GetMapping("isgameoverhuai1.do")
    public R isgameoverhuai1(int roomid){
        return service.isgameoverhuai1(roomid);
    }
    @GetMapping("isgameoverhuai2.do")
    public R isgameoverhuai2(int roomid){
        return service.isgameoverhuai2(roomid);
    }
    @GetMapping("toupiao.do")
    public R toupiao(int roomid,int uid){
        return service.toupiao(roomid, uid);
    }

}
